package com.burntsky.xbmc.android;


import java.util.ArrayList;

import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RemoteViews;
import android.widget.TextView;
import android.widget.Button;

import org.xbmc.android.remote.business.Command;
import org.xbmc.android.remote.business.ManagerFactory;
import org.xbmc.android.remote.business.TvShowManager;
import org.xbmc.android.util.ClientFactory;
import org.xbmc.android.util.HostFactory;
import org.xbmc.api.business.DataResponse;
import org.xbmc.api.business.INotifiableManager;
import org.xbmc.api.business.ITvShowManager;
import org.xbmc.api.object.Host;
import org.xbmc.api.object.TvShow;
import org.xbmc.api.presentation.INotifiableController;
import org.xbmc.httpapi.*;

import com.burntsky.xbmc.android.TvShowListFragment.OnTvShowSelectedListener;

public class TvShowActivity extends HomeActivityBase implements OnTvShowSelectedListener {
	
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(R.layout.main);
         
        FragmentManager fragMgr = this.getFragmentManager();
        FragmentTransaction txn = fragMgr.beginTransaction();
        txn.add(R.id.right_pane, new TvDetailsFragment(this._Controller));
        txn.commit();
    }

	@Override
	public void onTvShowSelected(String tvShowName) {
		TvDetailsFragment f = (TvDetailsFragment)this.getFragmentManager().findFragmentById(R.id.right_pane);
		f.Update(tvShowName);
	}
}

